package com.bytedance.common.utility.collection;

import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Map.Entry;

public class MaxSizeLinkedHashMap extends LinkedHashMap {
    final int mMaxSize;
    private static final long serialVersionUID = 3805937866184666407L;

    public MaxSizeLinkedHashMap(int arg2, int arg3) {
        this(arg2, arg3, false);
    }

    public MaxSizeLinkedHashMap(int arg3, int arg4, boolean arg5) {
        super(arg4, 0.75f, true);
        this.mMaxSize = arg3;
        if(arg3 <= 0) {
            throw new IllegalArgumentException("maxSize <= 0");
        }
    }

    protected boolean removeEldestEntry(Map.Entry arg3) {
        boolean v0 = this.size() > this.mMaxSize ? true : false;
        return v0;
    }
}

